<template>
<!-- 直播爆品榜 -->
  <div id="liveExplosiveRank">
    
      <!-- <el-tab-pane label="直播品牌榜" name="third">
        <BrandRank v-if="activeName == 'third'" />
      </el-tab-pane> -->

     <div class="rightBox">
      <div class="btn_group">
        <button
          :class="{ active: input_btn == '实时直播爆品榜' }"
          @click="input_btn = '实时直播爆品榜'"
        >
          实时直播爆品榜
        </button>
        <button
          :class="{ active: input_btn == '历史直播爆品榜' }"
          @click="input_btn = '历史直播爆品榜'"
        >
          历史直播爆品榜
        </button>
       
       
      </div>
      <div class="rightBox-content">
        <LiveExplosiveProRank v-if="input_btn == '实时直播爆品榜'" />
        <LiveGoodsRank v-if="input_btn == '历史直播爆品榜'" />
        
      </div>
    </div>
  </div>
</template>

<script>
import LiveExplosiveProRank from "./liveExplosiveProRank.vue";
import LiveGoodsRank from "./liveGoodsRank.vue";
import BrandRank from "./brandRank.vue";
export default {
  name: "liveExplosiveRank",
  components: { LiveExplosiveProRank, LiveGoodsRank, BrandRank },
  data() {
    return {
      input_btn: "实时直播爆品榜",
    };
  },
  computed: {},
  watch: {
         activeName(newvalue) {
      if (newvalue == 'first') {
        document.title =
          "实时直播爆品榜-直播电商数据分析&智能分析服务平台-掌上精选";
      } else {
        document.title =
          "历史直播爆品榜-直播电商数据分析&智能分析服务平台-掌上精选";
      }
      // console.log(this.tit);
    },
  },
  created() {
     document.title =
          "实时直播爆品榜-直播电商数据分析&智能分析服务平台-掌上精选";
    if (this.$route.params.id) {
      this.input_btn = this.$route.params.id;
    }
  },
  mounted() {
    this.showtabs()
  },
  methods: {
    showtabs() {
      if (this.$route.query.input_btn != null) {
        this.input_btn = this.$route.query.input_btn
      }
    },
  },
};
</script>
<style lang='less' scoped>
#liveExplosiveRank {
  background: #f1f1f1;
  height: fit-content;
  margin-left: @margin-num;
  margin-right: @margin-num;
  margin-top: @margin-num;
  border-radius: 4px;
  min-height: 100vh;
  position: relative;
    .rightBox {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    height: 100%;
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    border-radius: 6px;
    .btn_group {
      .active {
        background-color: #fd7f2c;
        color: #ffffff !important;
      }
      button {
        font-size: 14px;
        color: #555;
        padding-left: 23px;
        padding-right: 23px;
        height: 40px;
        background-color: #fff;
        border-radius: 4px;
        margin-right: 7px;
        font-weight: 600;
      }
      button:hover{
          color: #ff924b;
      }
    }
  }
  .rightBox-content {
    background-color: #ffffff;
    border-radius: 6px;
   
    margin-top: 10px;
    padding-bottom: 0;
  }
}
</style>